/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.fesppr.sacob.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;

/**
 *
 * @author chrestenzen
 */
public class SacobDAO {

    private static final String driver = "org.postgresql.Driver";
    private static final String dataBaseUrl = "jdbc:postgresql://localhost:5432/sacob";
    private static final String dataBaseUser = "sacob";
    private static final String dataBasePass = "sacob";

    private SacobDAO(){}
    
    public static Connection getConexao() {
        Connection con = null;
        try {
            Class.forName(driver);
            con = DriverManager.getConnection(dataBaseUrl, dataBaseUser, dataBasePass);

        }
        catch(Exception ex)
        {
            JOptionPane.showMessageDialog(null, "Erro banco");
        }
        return con;
    }
}
